package org.anjan.dp.factory;

/**
 * Created by chebbaso on 12/4/14.
 */
public class Main {
    public static void main(String[] args) {
        ShipFactory factory = new ShipFactory();
        EnemyShip ufo = factory.getShip("UFO");
        EnemyShip rocket = factory.getShip("ROCKET");
        doOperation(ufo);
        doOperation(rocket);
    }

    private static void doOperation(EnemyShip ship)
    {
        System.out.println(ship.getName());
        ship.followHeroShip();
        ship.displayEnemyShip();
    }
}
